package ui;

import java.awt.CardLayout;
import java.awt.Color;

import javax.swing.JPanel;

import logic.ACListAdmin;

public class AdminCenterPanel extends JPanel {

	public AdminCreateUser adminCreateUser;
	public AdminExchangeRate adminexchangerate;

	public AdminCenterPanel() {
		setBackground(Color.decode("#3a3a3a"));
		setSize(GlobalScreen.SIZE);
		setLayout(new CardLayout());
		adminCreateUser = new AdminCreateUser();
		adminexchangerate = new AdminExchangeRate();

		add(adminCreateUser, "admincreateuser");
		add(adminexchangerate, "adminexchangerate");

		show("adminexchangerate");
	}

	public void show(String panel) {
		((CardLayout) getLayout()).show(this, panel);
	}

	public void addACList(ACListAdmin ac) {
		adminCreateUser.addACList(ac);
		adminexchangerate.addACList(ac);
	}

}
